fix(ui-date-input,ui-avatar): add ref support to functional components#1938
Merged
fix(ui-date-input,ui-avatar): add ref support to functional components#1938
Conversation
matyasf
commented
Apr 10, 2025
| // default to the system's locale | ||
| return Locale.browserLocale() | ||
| } | ||
| const DateInput2 = forwardRef( |
Collaborator
Author
There was a problem hiding this comment.
The actual change is just wrapping this in a forwardRef
matyasf
commented
Apr 10, 2025
| return ( | ||
| <TextInput | ||
| {...passthroughProps(rest)} | ||
| ref={ref} |
Collaborator
Author
There was a problem hiding this comment.
this is the only change in the component
|
6762739 to
2b414c7
Compare
This is needed for things that try to access the ref prop, like our Transition package INSTUI-4520
2b414c7 to
96807df
Compare
balzss
approved these changes
Apr 24, 2025
HerrTopi
approved these changes
Apr 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is needed for things that try to access the
refprop, like our Transition or Position package.Also we have a page asking users to add the
refprop, see https://instructure.design/#accessing-the-domFinally in React 19 this code will be much simpler, see https://react.dev/blog/2024/12/05/react-19#ref-as-a-prop
To test: check is
Transition,Positionworks withAvatarandDateInput2Fixes INSTUI-4520